<template tag="以下文档内容为hycli自动生成">
  <div style="height: 100%">
    <div style="margin:0.8rem;"><h5 style="display:inline">测试任务</h5><span style="margin-left: 0.5rem; color:#999"> 测试情况跟踪管理</span>
        <ddmenu :menuList="lob_idList" @valueChanged="onlob_idChange" v-model="form_aaaby.lob_id" menuType="my_business_line" ></ddmenu>
    </div>
    <hr style="margin-top:0;color:#999"/>
<div class="query">
    
    <div class="tabs">
        <el-tabs v-model="form_aaaby.archive_status"  @tab-change="onQuery">
            <el-tab-pane v-for="item in archive_statusTabList" :name="item.value" :key="item.value" :label="item.name" 
             ></el-tab-pane>
          </el-tabs>
    </div>
    <el-form :model="form_aaaby" inline >
        <!-- 日期控件个数： 5 -->
        <el-form-item>
            <!--多日期范围控件 -->
            <el-select v-model="form_aaaby.single_date_range_name" filterable placeholder="日期类型" style="width:120px;" class="prepend">
                <el-option
                v-for="item in multiQueryDateRange"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
        </el-select>
            <el-date-picker :shortcuts="shortcuts" style="width: 200px" v-model="form_aaaby.single_date_range_value" type="daterange" start-placeholder="开始日期"
                end-placeholder="结束日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
        </el-form-item>
        <!--研发计划 下拉控件 -->
        <el-form-item>
            <el-select   @change="onChange_plan_id"   v-model="form_aaaby.plan_id" style="width: 100px" filterable clearable placeholder="研发计划">
                <el-option v-for="item in plan_idList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!--用例编写 下拉控件 -->
        <el-form-item>
            <el-select  v-model="form_aaaby.master" style="width: 100px" filterable clearable placeholder="用例编写">
                <el-option v-for="item in masterList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!--测试执行 下拉控件 -->
        <el-form-item>
            <el-select  v-model="form_aaaby.executor" style="width: 100px" filterable clearable placeholder="测试执行">
                <el-option v-for="item in executorList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!--产品需求 下拉控件多选 -->
        <el-form-item>
            <el-select v-model="form_aaaby.prod_id" filterable clearable multiple collapse-tags  style="width: 140px"
            collapse-tags-tooltip placeholder="产品需求">
                <el-option v-for="item in prod_idList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!--测试状态 下拉控件多选 -->
        <el-form-item>
            <el-select v-model="form_aaaby.tstatus" filterable clearable multiple collapse-tags  style="width: 140px"
            collapse-tags-tooltip placeholder="测试状态">
                <el-option v-for="item in tstatusList" :key="item.value" :label="item.name" :value="item.value" />
            </el-select>
        </el-form-item>
        <!-- 控件个数：[{"index":9,"raw":"name","name":"name","cname":"Name","type":{"raw":"varchar2(48)","name":"varchar2","len":48,"dlen":0},"defValue":"","allowNull":false,"constraints":["l","le","q","c","u","v","rows(1)","lw(160)","DN","#like"],"desc":{"raw":"名称","name":"名称"}}] -->
         <el-form-item>
            <el-input clearable style="width: 180px" v-model="form_aaaby.single_text_value" maxlength="32"
                placeholder="关键字" >
                <template #prepend>
                    <el-select v-model="form_aaaby.single_text_name" placeholder="查询类型" style="width:84px;">
                        <el-option
                        v-for="item in multiQueryText"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                      </el-select>
                  </template>
            </el-input>
        </el-form-item>

        <span class="ddl">
        </span>
        <el-form-item>
            <el-space wrap>
                <el-button type="primary" icon="Search" @click="onQuery(true)">查询</el-button>
            </el-space>
        </el-form-item>
        
        <div class="blist">
            <el-button-group>
                <el-button :type="$js.page.tagColor(0)"
                
                 icon="Plus"  @click="show_cmpnt_aaawg">分配测试任务</el-button>
                <el-button :type="$js.page.tagColor(1)"
                 :disabled="bcheck.length==0" 
                 icon="ChatDotRound"  @click="show_cmpnt_aaawh">批量修改状态</el-button>
            </el-button-group>
        </div>

        <!-- xtabs -->
        

    </el-form>
</div>
<div>
   <aabeh ref="cmpnt_aabeh" @onsaved="onQuery"></aabeh>
   <aabei ref="cmpnt_aabei" @onsaved="onQuery"></aabei>
   <aaagc ref="cmpnt_aaagc" @onsaved="onQuery"></aaagc>
   <aabej ref="cmpnt_aabej" @onsaved="onQuery"></aabej>
   <aaawg ref="cmpnt_aaawg" @onsaved="onQuery"></aaawg>
   <aaawh ref="cmpnt_aaawh" @onsaved="onQuery"></aaawh>
   <aaawf ref="cmpnt_aaawf" @onsaved="onQuery"></aaawf>
   <aaawd ref="cmpnt_aaawd" @onsaved="onQuery"></aaawd>
   <aaawe ref="cmpnt_aaawe" @onsaved="onQuery"></aaawe>
</div>
<div class="list">
    <el-table :data="dataList_aaaby"
    @selection-change="handleSelectionChange" 
    v-loading="conf.loading" stripe  style="width: 100%;height:calc(100vh - 160px)"
         empty-text="无数据">le
<el-table-column width="24px" type="expand">
    <template #default="view">
        <el-row :gutter="24">
            <el-col :span="5" class="text-right" style="min-height:26px">任务:</el-col>
            <el-col :span="7" v-text="view.row.le_tsk_id" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">研发计划:</el-col>
            <el-col :span="7" v-text="view.row.plan_id_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">产品需求:</el-col>
            <el-col :span="7" v-text="view.row.prod_id_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">名称:</el-col>
            <el-col :span="7" v-html="view.row.le_name||'-'" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">优先级:</el-col>
            <el-col :span="7" v-text="view.row.priority_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.priority,'priority')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">测试状态:</el-col>
            <el-col :span="7" v-text="view.row.tstatus_label" style="min-height:26px"
              :class="$js.page.colorful(view.row.tstatus,'tstatus')" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">用例编写:</el-col>
            <el-col :span="7" v-text="view.row.master_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">测试执行:</el-col>
            <el-col :span="7" v-text="view.row.executor_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">用例数:</el-col>
            <el-col :span="7" v-text="view.row.le_case_count" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">创建人:</el-col>
            <el-col :span="7" v-text="view.row.creator_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">创建时间:</el-col>
            <el-col :span="7" v-text="view.row.le_create_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">内容:</el-col>
            <el-col :span="7" v-html="view.row.le_content||'-'" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">用例评审:</el-col>
            <el-col :span="7" v-text="view.row.le_finish_case_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">开始测试:</el-col>
            <el-col :span="7" v-text="view.row.le_start_test_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">完成时间:</el-col>
            <el-col :span="7" v-text="view.row.le_finish_test_time" style="min-height:26px" ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">归档状态:</el-col>
            <el-col :span="7" v-text="view.row.archive_status_label" style="min-height:26px"
              ></el-col>
            <el-col :span="5" class="text-right" style="min-height:26px">业务线:</el-col>
            <el-col :span="7" v-text="view.row.lob_id_label" style="min-height:26px"
              ></el-col>
        </el-row>
    </template>
</el-table-column>
          <el-table-column type="selection" width="32" /> 
        	<!--tsk_id text -->
        <el-table-column  show-overflow-tooltip   min-width="60"   align="center" label="任务" >
            <template #default="scope">
                  <span>{{ scope.row.tsk_id||'-' }}</span>
              </template>
        </el-table-column>
        	<!--name text -->
        <el-table-column  show-overflow-tooltip   min-width="160"   align="center" label="名称" >
            <template #default="scope">
                  <span>{{ scope.row.name||'-' }}</span>
              </template>
        </el-table-column>
        	<!--priority tag -->
        <el-table-column  :filters="priorityList" :filter-method="$js.page.columnfilter" column-key="priority"   v-if="$size.gt('m')"   min-width="80"  prop="priority" align="center" label="优先级">
            <template #default="scope">
                <el-tag :type="$js.page.tagColor(scope.row.priority,'priority')" round v-text="scope.row.priority_label"  ></el-tag>
            </template>
        </el-table-column>
        	<!--tstatus radio -->
        <el-table-column  :filters="tstatusList" :filter-method="$js.page.columnfilter" column-key="tstatus"     prop="tstatus" align="center" label="测试状态">
            <template #default="scope">
                <span :class="$js.page.colorful(scope.row.tstatus,'tstatus')" 
                    v-text="scope.row.tstatus_label"></span>
            </template>
        </el-table-column>
        	<!--master radio -->
        <el-table-column  :filters="masterList" :filter-method="$js.page.columnfilter" column-key="master"    min-width="80"   prop="master" align="center" label="用例编写">
            <template #default="scope">
                <span 
                    v-text="scope.row.master_label"></span>
            </template>
        </el-table-column>
        	<!--executor radio -->
        <el-table-column  :filters="executorList" :filter-method="$js.page.columnfilter" column-key="executor"    min-width="80"   prop="executor" align="center" label="测试执行">
            <template #default="scope">
                <span 
                    v-text="scope.row.executor_label"></span>
            </template>
        </el-table-column>
        	<!--case_count text -->
        <el-table-column  show-overflow-tooltip   min-width="60"   align="center" label="用例数" >
            <template #default="scope">
                  <span>{{ scope.row.case_count||'-' }}</span>
              </template>
        </el-table-column>
        	<!--finish_case_time date -->
        <el-table-column  v-if="$size.gt('m')"  show-overflow-tooltip    align="center" label="用例评审" >
            <template #default="scope">
                  <span>{{ scope.row.finish_case_time||'-' }}</span>
              </template>
        </el-table-column>
        	<!--start_test_time date -->
        <el-table-column  show-overflow-tooltip    align="center" label="开始测试" >
            <template #default="scope">
                  <span>{{ scope.row.start_test_time||'-' }}</span>
              </template>
        </el-table-column>
        	<!--finish_test_time date -->
        <el-table-column  v-if="$size.gt('m')"  show-overflow-tooltip    align="center" label="完成时间" >
            <template #default="scope">
                  <span>{{ scope.row.finish_test_time||'-' }}</span>
              </template>
        </el-table-column>
        <el-table-column :width="21*20+20" align="center" label="任务进度">
        <template #header>
            <gantt mode="header" :maxNo="21" @selectChange="ganttChange" :data="dataList_aaaby"
            :labels="['用例编写','测试阶段']"
            :dates="['case_time','test_time']"></gantt>
        </template>
        <template #default="scope">
            <gantt mode="line" :maxNo="21" :ganttIdx="ganttIdx" :data="dataList_aaaby" :row="scope.row.__raw"
            :labels="['用例编写','测试阶段']"
            :dates="['case_time','test_time']"></gantt>
        </template>
        </el-table-column>

<el-table-column fixed="right" align="center" label="操作" width="168">
    <template #default="scope">
        <div class="opts">
            <el-button   type="text" @click="show_cmpnt_aaawf(scope.row)" >详情 </el-button>
            <el-button   type="text" @click="show_cmpnt_aaawd(scope.row)" >编辑 </el-button>
            <el-button   type="text" @click="show_cmpnt_aaawe(scope.row)" >删除 </el-button>
        </div>
    </template>
</el-table-column>
    </el-table>
    <el-pagination :currentPage="form_aaaby.pi" :page-size="form_aaaby.ps"
        style="position: absolute; right: 30px;bottom:6px;" :page-sizes="[10,15,20,30, 50, 100]" :background="false" small
        layout="total,sizes,prev, pager, next, jumper" :total="total_aaaby" @size-change="handleSizeChange"
        @current-change="handleCurrentChange" />
</div>
  </div>
</template>
<script>
// 添加文档
import aabeh from "@/views/ws/dev/dev_docs.add"
// 编辑
import aabei from "@/views/ws/dev/dev_docs.edit"
// 删除
import aaagc from "@/views/ws/dev/dev_docs.cnfrm"
// 添加
import aabej from "@/views/ws/collab/collab_task.add"
// 分配测试任务
import aaawg from "@/views/ws/test/test_task.add"
// 批量修改状态
import aaawh from "@/views/ws/test/test_task.dialog"
// 详情
import aaawf from "@/views/ws/test/test_task.view"
// 编辑
import aaawd from "@/views/ws/test/test_task.edit"
// 删除
import aaawe from "@/views/ws/test/test_task.cnfrm"
// 测试任务
import gantt from "@/views/cmpnts/gantt.vue"
// 业务线
import ddmenu from "@/views/cmpnts/ddMenu.vue"



export default {
components: {
    aabeh,
    aabei,
    aaagc,
    aabej,
    aaawg,
    aaawh,
    aaawf,
    aaawd,
    aaawe,
    gantt,
     ddmenu,
},
data() {
  return {
    shortcuts: this.$js.page.latestDays(),
    cmpnt_funcs:{},
    bcheck:[],
    conf: {
      loading: false,
      progressColor: this.$theia.env.conf.progress || []
    },
    ganttIdx: -1,
        form_aaaby: {
            pi: 1,
            ps: 15,
            disabled:false,
            single_date_range_name:"",
            single_date_range_value:[],
            single_text_name:"",
            single_text_value:"",
            plan_id:"",
            prod_id:[],
            name:"",
            tstatus:[],
            master:"",
            executor:"",
            create_time:"",
            start_case_time:"",
            finish_case_time:"",
            start_test_time:"",
            finish_test_time:"",
            archive_status:"",
            lob_id:"",
            },
            plan_idList:[],
            prod_idExts:[],
            prod_idList:[],
            priorityList:[],
            tstatusExts:[],
            tstatusList:[],
            masterList:[],
            executorList:[],
            creatorList:[],
            archive_statusList:[],
            archive_statusTabList:[],
            lob_idList:[],
            dataList_aaaby:[],
            multiQueryDateRange:[{label:"创建时间",value:"create_time"},{label:"开始时间",value:"start_case_time"},{label:"用例评审",value:"finish_case_time"},{label:"开始测试",value:"start_test_time"},{label:"完成时间",value:"finish_test_time"},],
            multiQueryText:[{label:"名称",value:"name"},],
            total_aaaby:0,
            note_dataList:[],
};
  },
mounted() {
  this.loadEnums_aaaby()
  this.form_aaaby.lob_id = this.$theia.user.get("lob_id")
  this.form_aaaby.single_date_range_name = (this.multiQueryDateRange[0]||{}).value
  this.form_aaaby.single_text_name = (this.multiQueryText[0]||{}).value
  this.cmpnt_funcs["aabeh"] = this.show_cmpnt_aabeh
  this.cmpnt_funcs["aabei"] = this.show_cmpnt_aabei
  this.cmpnt_funcs["aaagc"] = this.show_cmpnt_aaagc
  this.cmpnt_funcs["aabej"] = this.show_cmpnt_aabej
  this.cmpnt_funcs["aaawg"] = this.show_cmpnt_aaawg
  this.cmpnt_funcs["aaawh"] = this.show_cmpnt_aaawh
  this.cmpnt_funcs["aaawf"] = this.show_cmpnt_aaawf
  this.cmpnt_funcs["aaawd"] = this.show_cmpnt_aaawd
  this.cmpnt_funcs["aaawe"] = this.show_cmpnt_aaawe

  this.form_aaaby = Object.assign(this.form_aaaby,this.$route.params)
    },
 watch: {
    '$route' () {
      this.form_aaaby = Object.assign(this.form_aaaby,this.$route.params)
      this.onQuery();//我的初始化方法
    }
  },
methods: {
  ganttChange(id) {
      this.ganttIdx = id
    },

queryData_aaaby(mform = {},nform={}){
    //构建查询参数
    let queryForm = Object.assign({},this.form_aaaby)
    queryForm = Object.assign(queryForm,nform||{})
    
    //处理多个日期选择
    queryForm[this.form_aaaby.single_date_range_name] = this.form_aaaby.single_date_range_value
    queryForm[this.form_aaaby.single_text_name] = this.form_aaaby.single_text_value
   
    //处理日期范围选择
      queryForm.prod_id = (queryForm.prod_id||[]).join(",")
      queryForm.tstatus = (queryForm.tstatus||[]).join(",")
      queryForm.start_create_time = null
      queryForm.end_create_time = null
    if(queryForm.create_time && queryForm.create_time.length > 1){
      queryForm.start_create_time = queryForm.create_time[0]
      queryForm.end_create_time = queryForm.create_time[1]
    }
      queryForm.start_start_case_time = null
      queryForm.end_start_case_time = null
    if(queryForm.start_case_time && queryForm.start_case_time.length > 1){
      queryForm.start_start_case_time = queryForm.start_case_time[0]
      queryForm.end_start_case_time = queryForm.start_case_time[1]
    }
      queryForm.start_finish_case_time = null
      queryForm.end_finish_case_time = null
    if(queryForm.finish_case_time && queryForm.finish_case_time.length > 1){
      queryForm.start_finish_case_time = queryForm.finish_case_time[0]
      queryForm.end_finish_case_time = queryForm.finish_case_time[1]
    }
      queryForm.start_start_test_time = null
      queryForm.end_start_test_time = null
    if(queryForm.start_test_time && queryForm.start_test_time.length > 1){
      queryForm.start_start_test_time = queryForm.start_test_time[0]
      queryForm.end_start_test_time = queryForm.start_test_time[1]
    }
      queryForm.start_finish_test_time = null
      queryForm.end_finish_test_time = null
    if(queryForm.finish_test_time && queryForm.finish_test_time.length > 1){
      queryForm.start_finish_test_time = queryForm.finish_test_time[0]
      queryForm.end_finish_test_time = queryForm.finish_test_time[1]
    }

    queryForm[this.form_aaaby.single_date_range_name] = null
    queryForm.single_date_range_value = null
    queryForm.single_date_range_name = null

    queryForm.single_text_value = null
    queryForm.single_text_name = null
 
    //处理关联表test_task test_task test_task
   
    //发送查询请求
    let that = this
    that.conf.loading = true
    //构建统计查询
  //数据查询
  this.$theia.http.get("/ws/test/task/query",queryForm).then(res=>{
      if((res.items||[]).length < (queryForm.ps||10)){
        that.form_aaaby.disabled = true
      }
      that.conf.loading = false
      that.dataList_aaaby = res.items||[]
      that.total_aaaby = res.count
      that.resetItemData_aaaby(that,that.dataList_aaaby)
    });
  },

  resetItemData_aaaby(that,lst){
    lst.forEach(item => {
      item.__raw = Object.assign({}, item)
    item.plan_id_label = that.$theia.enum.getName("dev_plan",item.plan_id)
    item.prod_id_label = that.$theia.enum.getName("prod_requirement",item.prod_id)
    item.priority_label = that.$theia.enum.getName("PRI",item.priority)
    item.tstatus_label = that.$theia.enum.getName("tstatus",item.tstatus)
    item.master_label = that.$theia.enum.getName("tmaster",item.master)
    item.executor_label = that.$theia.enum.getName("tmaster",item.executor)
    item.creator_label = that.$theia.enum.getName("user_account",item.creator)
    item.archive_status_label = that.$theia.enum.getName("archive_status",item.archive_status)
    item.lob_id_label = that.$theia.enum.getName("my_business_line",item.lob_id)
    item.tsk_id_progress = item.tsk_id
    item.plan_id_progress = item.plan_id
    item.prod_id_progress = item.prod_id
    item.name_progress = item.name
    item.priority_progress = item.priority
    item.tstatus_progress = item.tstatus
    item.master_progress = item.master
    item.executor_progress = item.executor
    item.case_count_progress = item.case_count
    item.creator_progress = item.creator
    item.create_time_progress = item.create_time
    item.content_progress = item.content
    item.finish_case_time_progress = item.finish_case_time
    item.start_test_time_progress = item.start_test_time
    item.finish_test_time_progress = item.finish_test_time
    item.archive_status_progress = item.archive_status
    item.lob_id_progress = item.lob_id
    item.le_tsk_id = item.tsk_id
    item.le_plan_id = item.plan_id
    item.le_prod_id = item.prod_id
    item.le_name = item.name
    item.le_priority = item.priority
    item.le_tstatus = item.tstatus
    item.le_master = item.master
    item.le_executor = item.executor
    item.le_case_count = item.case_count
    item.le_creator = item.creator
    item.le_create_time = that.$theia.str.dateFormat(item.create_time,'MM/dd')
    item.le_content = item.content
    item.le_finish_case_time = that.$theia.str.dateFormat(item.finish_case_time,'MM/dd')
    item.le_start_test_time = that.$theia.str.dateFormat(item.start_test_time,'MM/dd HH时')
    item.le_finish_test_time = that.$theia.str.dateFormat(item.finish_test_time,'MM/dd HH时')
    item.le_archive_status = item.archive_status
    item.le_lob_id = item.lob_id
    item.finish_case_time = that.$theia.str.dateFormat(item.finish_case_time,'MM/dd')
    item.start_test_time = that.$theia.str.dateFormat(item.start_test_time,'MM/dd HH时')
    item.finish_test_time = that.$theia.str.dateFormat(item.finish_test_time,'MM/dd HH时')
    if(item.children){
      that.resetItemData_aaaby(that,item.children)
    }
  });
  }, 
    onChange_plan_id(val){
      this.prod_idList = this.$theia.enum.get("prod_requirement",val)
      this.form_aaaby.prod_id = null
    }, 
    onChange_prod_id(val){
      this.prod_idList = this.$theia.enum.get("prod_requirement",val)
      this.form_aaaby.prod_id = null
    },
    handleSelectionChange(lst=[]){
      this.bcheck = []
      lst.forEach(f=>{
        this.bcheck.push(f.tsk_id)
      })
    },
    loadEnums_aaaby(){
        //研发计划
        this.plan_idList = this.$theia.enum.get("dev_plan","",this.$theia.user.get("lob_id"),false,"")
        //产品需求
        this.prod_idList = this.$theia.enum.get("prod_requirement",((this.form_aaaby||this.form).plan_id||"")+"",this.$theia.user.get("lob_id"),false,"")
        //测试状态
        this.tstatusList = this.$theia.enum.get("tstatus","","" ,false,"")
        //用例编写
        this.masterList = this.$theia.enum.get("tmaster","",this.$theia.user.get("lob_id"),false,"")
        //测试执行
        this.executorList = this.$theia.enum.get("tmaster","",this.$theia.user.get("lob_id"),false,"")
        //归档状态
        this.archive_statusTabList = this.$theia.enum.get("archive_status","","",false,"")
        //业务线
        this.lob_idList = this.$theia.enum.getTree("my_business_line","","" ,99)
        //优先级
        this.priorityList = this.$theia.enum.get("PRI","","" ,false,"")
        //测试状态
        this.tstatusList = this.$theia.enum.get("tstatus","","" ,false,"")
        //用例编写
        this.masterList = this.$theia.enum.get("tmaster","",this.$theia.user.get("lob_id"),false,"")
        //测试执行
        this.executorList = this.$theia.enum.get("tmaster","",this.$theia.user.get("lob_id"),false,"")
    },

  handleSizeChange(ps){
    this.form_aaaby.ps = ps
    this.onQuery(true)
  },
  onlob_idChange(v){
    this.$theia.user.set("lob_id",v)
    this.loadEnums_aaaby()
    this.onQuery(true)
  },
  handleCurrentChange(pi){
    this.form_aaaby.pi = pi
    this.onQuery()
  },
  onQuery(refresh){
    if(refresh){
      this.form_aaaby.pi = 1
    }
    this.queryData_aaaby ()
  },
show_cmpnt(cmd,row){
  if(this.cmpnt_funcs[cmd]){
    this.cmpnt_funcs[cmd](row)
  }
},
  //详情
  show_cmpnt_aaawf(fm = {}){
    let query = {} 
    query.tsk_id = fm.tsk_id|| fm.le_tsk_id 
    query.plan_id = fm.plan_id|| fm.le_plan_id 
    query.prod_id = fm.prod_id|| fm.le_prod_id 
    query.name = fm.name|| fm.le_name 
    query.priority = fm.priority|| fm.le_priority 
    query.tstatus = fm.tstatus|| fm.le_tstatus 
    query.master = fm.master|| fm.le_master 
    query.executor = fm.executor|| fm.le_executor 
    query.case_count = fm.case_count|| fm.le_case_count 
    query.creator = fm.creator|| fm.le_creator 
    query.create_time = fm.create_time|| fm.le_create_time 
    query.content = fm.content|| fm.le_content 
    query.start_case_time = fm.start_case_time|| fm.le_start_case_time 
    query.finish_case_time = fm.finish_case_time|| fm.le_finish_case_time 
    query.start_test_time = fm.start_test_time|| fm.le_start_test_time 
    query.finish_test_time = fm.finish_test_time|| fm.le_finish_test_time 
    query.archive_status = fm.archive_status|| fm.le_archive_status 
    query.lob_id = fm.lob_id|| fm.le_lob_id 
    query.tsk_id = fm.tsk_id

      //2023.4.18添加---

    query.$title="详情"
    this.$refs.cmpnt_aaawf.show(query)
  },
  //分配测试任务
  show_cmpnt_aaawg(fm = {}){
    let query = {} 
    query.plan_id = fm.plan_id|| fm.le_plan_id 
    query.prod_id = fm.prod_id|| fm.le_prod_id 
    query.name = fm.name|| fm.le_name 
    query.priority = fm.priority|| fm.le_priority 
    query.tstatus = fm.tstatus|| fm.le_tstatus 
    query.master = fm.master|| fm.le_master 
    query.executor = fm.executor|| fm.le_executor 
    query.case_count = fm.case_count|| fm.le_case_count 
    query.content = fm.content|| fm.le_content 
    query.start_case_time = fm.start_case_time|| fm.le_start_case_time 
    query.finish_case_time = fm.finish_case_time|| fm.le_finish_case_time 
    query.start_test_time = fm.start_test_time|| fm.le_start_test_time 
    query.finish_test_time = fm.finish_test_time|| fm.le_finish_test_time 
    query.tsk_id = fm.tsk_id

      //2023.4.18添加---

    query.$title="分配测试任务"
    this.$refs.cmpnt_aaawg.show(query)
  },
  //批量修改状态
  show_cmpnt_aaawh(fm = {}){
    let query = {}
    query.ti = fm.arc|| fm.le_arc 
    query.tsk_id = fm.tsk_id

      //2023.4.18添加---
    query.tsk_id = (this.bcheck||[]).join(",")

    query.$title="批量修改状态"
    this.$refs.cmpnt_aaawh.show_aaawh(query)
  },
  //编辑
  show_cmpnt_aaawd(fm = {}){
    let query = {} 
    query.plan_id = fm.plan_id|| fm.le_plan_id 
    query.prod_id = fm.prod_id|| fm.le_prod_id 
    query.name = fm.name|| fm.le_name 
    query.priority = fm.priority|| fm.le_priority 
    query.tstatus = fm.tstatus|| fm.le_tstatus 
    query.master = fm.master|| fm.le_master 
    query.executor = fm.executor|| fm.le_executor 
    query.case_count = fm.case_count|| fm.le_case_count 
    query.content = fm.content|| fm.le_content 
    query.start_case_time = fm.start_case_time|| fm.le_start_case_time 
    query.finish_case_time = fm.finish_case_time|| fm.le_finish_case_time 
    query.start_test_time = fm.start_test_time|| fm.le_start_test_time 
    query.finish_test_time = fm.finish_test_time|| fm.le_finish_test_time 
    query.tsk_id = fm.tsk_id

      //2023.4.18添加---

    query.$title="编辑"
    this.$refs.cmpnt_aaawd.show(query)
  },
  //删除
  show_cmpnt_aaawe(fm = {}){
    let query = {} 
    query.tsk_id = fm.tsk_id|| fm.le_tsk_id 
    query.tsk_id = fm.tsk_id

      //2023.4.18添加---

    query.$title="删除"
    this.$refs.cmpnt_aaawe.show_aaawe(query)
  },
},
};
</script>
<style>
.el-dialog{
  border-radius:5px !important
}
</style>
<style scoped>
.el-form-item {
  margin-right: 10px !important;
}

.opts .el-button--small {
  margin-left: 0px;
  padding-left: 0px;
  margin-right: 4px;
}

/deep/.el-table td.el-table__cell div {
  vertical-align: middle;
}
/deep/.el-button+.el-dropdown{
  margin-left:0px;
}
/deep/.el-button+.el-button{
  margin-left:0px;
}
.el-button{
  padding-left: 6px !important;
  padding-right: 6px !important;
}
.blist {
  margin-bottom: 8px;
  width: 100%;
}

.blist .el-radio-group {
  margin-right: 8px;
}

.ddl {
  margin-bottom: 8px;
  width: 100%;

}

.ddl .el-dropdown {
  margin-right: 8px;
}

.listbar {
  margin-bottom: 8px;
  text-align: center;
}
 .el-dropdown-link {
  cursor: pointer;
  color: var(--el-color-primary);
  display: flex;
  align-items: center;
  font-size: 0.65rem;
}
/deep/.el-button--small{
  padding: 5px 4px;
}

.prepend /deep/.el-input__wrapper{
  border-top-right-radius:0;
  border-bottom-right-radius:0;
}
.prepend+/deep/.el-date-editor{
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  border-left:0;
}

</style>